//
//  WebViewController.m
//  产业头条
//
//  Created by ZJ on 16/12/15.
//  Copyright © 2016年 ZJ. All rights reserved.
//

#import "WebViewController.h"
#import "ZJAdditions.h"
@interface WebViewController ()
/** webView */
@property (nonatomic, strong) UIWebView *webView;
@end

@implementation WebViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
    
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    self.tabBarController.tabBar.hidden = NO;
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.titlelabel.text = @"二维码扫描结果";
    [self.view addSubview:self.webView];
}

- (void)setUrl:(NSString *)url{
    _url = url;
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
}


- (UIWebView *)webView{
    if (_webView == nil){
        _webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, LP_TopHeight, [UIScreen zj_screenWith], [UIScreen zj_screenHeight] - LP_TopHeight)];
        _webView.dataDetectorTypes = UIDataDetectorTypeAll;
        _webView.backgroundColor = [UIColor clearColor];
        [_webView setOpaque:YES];
    }
    return _webView;
}

@end
